Conventionally, a bar code is attached to a commodity to provide information about that commodity. The bar code is optically read in a noncontacting manner for information processing. Bar codes used at the POS (point of sales) of supermarkets represent commodity information by the thickness or interval between the parallel black bars. The bar code is utilized in information processing for sales management and inventory control.
It is also known that a bar code represents information by its inclination, rather than the thickness or interval between the bars. For example, it is conceivable that a bar code is attached to the surface of a semiconductor IC chip, and utilized in information processing for quality control or the like. However, in a manufacturing process of semiconductor IC chips, it is impossible to maintain, in a stable manner, the width of bars formed on the surface of a chip until the end of the process because of the nature of the process and the characteristics of semiconductor IC chip materials. Considering this fact, a reference line and bars having a predetermined inclination or direction with respect to the reference line are attached to a chip surface, particular numeric information is associated with the inclination or direction of bars, and the inclination of bars is detected and then used in information processing. This type of bar code is called an angular modulation (or theta modulation) bar code. The angular modulation bar code is superior to other types of bar codes which represent information by bar widths or intervals, with the characteristic of accurately representing the information (i.e., by means of inclination or direction) even if a chip surface to which a bar code is attached is expanded or contracted.
However, even with the angular modulation bar code, which is less affected by expansion and contraction, it becomes difficult to read the inclination or direction of bars if some foreign matter associated with the semiconductor IC manufacturing process is attached to the bars, or if bars are damaged in a manner which alters their shape. Further, it is difficult with conventional techniques to detect, at high speed, the inclination of line segments of bars from a bar image having noises or defects.
In one conventional technique for detecting the inclination or direction of bars, an image of an region to which a bar code has been attached is first binarized (i.e., converted to a black-and-white image), then it is determined based on known parameters (width and length of bars) whether a black or white portion with respect to the background is a subject bar or not, and finally, an inclination is calculated from coordinates of the two ends of the portion that has been determined to be a bar. This conventional technique is disclosed in Japanese PUPA No. 2-125384. This method of calculating the inclination is in itself simple and suitable for high-speed processing. However, if foreign matter or damage to the bar code region is present, and if some defect is thereby caused in the shape of a bar or a resultant image includes noise (such noise necessarily occurs in semiconductor integrated circuit manufacturing processes), frequently the end of a portion that has been determined to be a bar is lost. As a result, the inclination of bars may not be detected. Therefore, this method does not have high reliability. Further, this method requires image pre-processing for noise elimination and binarization, which is a bottleneck in realizing high-speed processing.
In another conventional method, a bar code image is binarized (i.e., converted to a black-and-white image), one point in the image is selected as the measurement center, and then the number of black or white pixels that represent a bar is calculated from the measurement center in every possible bar inclination direction. The direction that is associated with the maximum number of pixels is determined to be the bar direction. Reference is made to Japanese PUPA No. 2-214992. However, there are some difficulties in employing this conventional method to detect the direction of a bar code attached to a semiconductor chip. In general, an image of a bar code attached to a semiconductor chip has a light-and-dark unevenness (i.e., shading), which influences the binarized image. In order to binarize the bar code image without being affected by the shading, proper pre-processing is required, which makes it difficult to speed up the entire processing. Further, in the case of images having non-uniform shading, the position of the measurement center greatly influences the reliability of the bar angle reading.
In a further conventional method, a bar code image is binarized, the entire image is scanned in every possible bar inclination direction, and a distribution of pixels representing a bar is obtained in each direction. The direction that is associated with the pixel distribution having the maximum variation is judged to be the bar code direction. In this method, even where the image includes some noise, the influence of noise can be suppressed because the entire image is scanned. However, since the entire region of the image is scanned in every direction, this method requires much processing time, and is therefore not suitable for high-speed processing. Further, if unevenness in shading exists over the entire image, the bar code information is lost, as in the case with the above conventional method.